<?php

namespace App\Observers;

use App\Jobs\NoticeJob;
use App\Models\Notice;
class NoticeObserver {
    public function created(Notice $notice){
        dispatch(new NoticeJob());
    }
//    //添加之前
//    public function creating(Apiuser $apiuser){
//        $apiuser->password = bcrypt(request()->get('password'));
//    }
//    //修改之前
//    public function updating(Apiuser $apiuser){
//        if (!empty($apiuser->password)){
//            $apiuser->password = bcrypt(request()->get('password'));
//        }
//    }
}